package com.hzw.dao;

import com.hzw.entity.ShoppingCar;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
@Mapper
public interface ShoppingCarDao {
    /**
     * 添加购物车
     * @param shoppingCar
     * @return
     */
    int insert (ShoppingCar shoppingCar);

    /**
     * 删除购物车
     * @param shoppingCar
     * @return
     */
    int delByUserId (ShoppingCar shoppingCar);

    /**
     * 修改购物车
     * @param shoppingCar
     */
    void updateByUserId (ShoppingCar shoppingCar);

    /**
     * 查询购物车
     * @param shoppingCar
     * @return
     */
    List<ShoppingCar> selectByUserId(ShoppingCar shoppingCar);
}
